list = [1, 2, 3, 4, 5, 1, 2, 3]
ans = list[0]
first = 0
second = 0
for i in range(1, len(list)):
    ans ^= list[i]
result = ans & -ans
for i in range(0, len(list)):
    if (result & list[i]):
        first ^= list[i]
    else:
        second ^= list[i]
print('出现了一次的那2个数是%d %d' % (first, second))
